<?php

namespace Myth\Data\Model;

use Myth\Data;

abstract class AModel implements Data\IDataRepresentor
{
    protected function _setPropertiesFromArray($data)
    {
        foreach ($data as $prop => $value) {
            $method = 'set'.$prop;
            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }
    }
}